package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.PriceSystemMapper;
import com.gxa.saas.pojo.PriceSystem;
import com.gxa.saas.service.PriceSystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: yx
 * @Date: 2022/6/9 14:49
 */
@Service("priceSystemService")
public class PriceSystemServiceImpl implements PriceSystemService {

    @Autowired
    PriceSystemMapper priceSystemMapper;

    @Override
    public List<PriceSystem> selectAll() {
        return priceSystemMapper.selectAll();
    }

    @Override
    public Integer selectAllNumber() {
        return priceSystemMapper.selectAllNumber();
    }

    @Override
    public List<PriceSystem> selectByPage(Integer offset,Integer size) {
        return priceSystemMapper.selectByPage((offset-1)*size,size);
    }

    @Override
    public void insert(PriceSystem priceSystem) {
        priceSystemMapper.insert(priceSystem);
    }

    @Override
    public void update(PriceSystem priceSystem) {
        priceSystemMapper.update(priceSystem);
    }

    @Override
    public void delete(Integer id) {
        priceSystemMapper.delete(id);
    }
}
